
//
//
//	NadineClock
//
//
//

#define NDCLOCK \
	(dynamic_cast<NDClock*>(getArk()->queryModule("NDClock", this)))

namespace Nadine{
	class NDClock :public NDBaseObject
	{
	private:
	protected:
		bool	m_bTimerStopped;
		__int64 m_llStopTime;
		__int64 m_llLastElapsedTime;
		__int64 m_llBaseTime;

		__int64 m_llLastElapsedTimeSecond;
		UINT    m_nFramePerSecond;

	public:
		NDClock() :NDBaseObject(2),
			m_bTimerStopped(true),
			m_llStopTime(0),
			m_llLastElapsedTime(0),
			m_llBaseTime(0),
			m_llLastElapsedTimeSecond(0),
			m_nFramePerSecond(0)		{}
		virtual ~NDClock()				{}

		virtual void Reset()			{} // resets the timer
		virtual void Start()			{} // starts the timer
		virtual void Stop()				{}  // stop (or pause) the timer
		virtual void Advance()			{} // advance the timer by 0.1 seconds
		virtual float GetAbsoluteTime()	{return 0.0f;} // get the absolute system time
		virtual float GetTime()			{return 0.0f;}// get the current time
		virtual float GetElapsedTime()	{return 0.0f;} // get the time that elapsed between GetElapsedTime() calls
		virtual bool IsStopped()		{return m_bTimerStopped;} // returns true if timer stopped

		virtual UINT GetFPS()			{return m_nFramePerSecond;}
		virtual void AddFrame()			{}

	};
}